package live.zs.mybatisboot.controller;

import live.zs.mybatisboot.dto.PageInfo;
import live.zs.mybatisboot.entity.TbOrder;
import live.zs.mybatisboot.entity.TbUser;
import live.zs.mybatisboot.service.OrderService;
import live.zs.mybatisboot.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author madison
 * @description
 * @date 2021/7/8 23:30
 */
@RestController
@RequestMapping("/order")
public class OrderController {

    @Autowired
    private OrderService orderService;

    @GetMapping("list")
    public List<TbOrder> list() {
        return orderService.selectList();
    }


    @PutMapping("save")
    public int save(@RequestBody TbOrder order) {
        return orderService.save(order);
    }
}
